#include<iostream>
using namespace std;
void c(int &x,int &y){
	int temp = x;
	x=y;y=temp;
}
int f(int x,int y){
	if(y>x)c(x,y);
	int z=x-y;
	while(z!=0){
		if(z>y)c(z,y);
		x=y;
		y=z;
		z=x-y;
	}
	return y;
}
int main(){
	int fz,fm;
	scanf("%d/%d",&fz,&fm);
	int m=f(fz,fm);
	printf("%d/%d",fz/m,fm/m);
	return 0;
}
deploy:
  type: git
  repo: https://github.com/boothbyhqh/hquanheng.git
  branch: master

